/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-09
 * Time:13:04
 */
public class Main {
    public static void main(String[] args) {
        //返回0-1之间的双精度浮点数
        double i=Math.random();
        System.out.println(i);
        int k=(int)(Math.random()*100);
        System.out.println(k);
        //返回双精度的浮点类型的绝对值
        int x=Math.abs(-120);  //返回120；
        double y=Math.abs(22.23);   //返回22.23
        //返回四舍五入
        int x1=Math.round(22.3f); //返回22
        int x2=Math.round(-22.3f); //返回-22
        //返回参数小的值
        int x3=Math.min(24,240);  //返回24
        System.out.println(x+" "+y+" "+x1+" "+x2+" "+x3);
    }
}
